<?php
require 'Admin/Controller/Controller.php ';
require 'Admin/Model/IndexModel.php ';
class IndexController extends Controller{
	function __Construct(){
		parent::__Construct();
		//$this->mod = 'users';
	}
	function index(){
		$this->display(); 
		//return $data;
	}
	function login(){
		$data=$_POST;
		//var_dump($data);
		$model = new IndexModel();
		$result = $model->getAdminLogin($data);
		//var_dump($result);
		if($result)
		{
			echo '登录成功 <a href="admin.php?c=news&m=listnews">如果没有跳转，请点这里跳转</a>';
   			header("refresh:3;url='admin.php?c=news&m=listnews'");
		}
		else{
			echo "登录失败！<br/>";
  			echo "<a href='admin.php?c=index&m=index'>返回</a>";
		}

	}
	
}
?>